home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_065 / menubuilder / link < prev    next >
Text File  |  1992-05-06  |  1KB  |  53 lines

  1. .Key main_file,obj1,obj2,obj3,obj4,parsed/k
  2. ;   Link a C program                                Version 4.04
  3. ;   If you need to include any external subroutine modules
  4. ;   then use this execute file to Link your C program.
  5.  
  6. If NOT "<parsed>" EQ ""
  7.    SKIP DoIt
  8. endif
  9.  
  10. if "<obj4>" EQ ""
  11.    SKIP Try-3
  12. else
  13.    execute Link "<main_file>" "" "" "" "" PARSED +<obj1>.o+<obj2>.o+<obj3>.o+<obj4>.o
  14.    SKIP END
  15. endif
  16.  
  17. LAB Try-3
  18. if "<obj3>" EQ ""
  19.    SKIP Try-2
  20. else
  21.    execute Link "<main_file>" "" "" "" "" PARSED +<obj1>.o+<obj2>.o+<obj3>.o
  22.    SKIP END
  23. endif
  24.  
  25. LAB Try-2
  26. if "<obj2>" EQ ""
  27.    SKIP Try-1
  28. else
  29.    execute Link "<main_file>" "" "" "" "" PARSED +<obj1>.o+<obj2>.o
  30.    SKIP END
  31. endif
  32.  
  33. LAB Try-1
  34. if "<obj1>" EQ ""
  35.    SKIP DoIt
  36. else
  37.    execute Link "<main_file>""" "" "" "" PARSED +<obj1>.o
  38.    SKIP END
  39. endif
  40. ; --------------- Come here to execute the link --------------------
  41. LAB DoIt
  42. if not exists <main_file>.o
  43.    echo "File <main_file>.o does not exist.  Try again."
  44.    SKIP END
  45.    endif
  46.  
  47. Assign LIB: C-DELV:lib
  48.  
  49. echo "-- Linking...  <main_file>.o and <parsed> to create <main_file>"
  50. alink FROM LIB:LStartUp.obj+<main_file>.o<parsed> TO <main_file> LIBRARY LIB:lc.lib+LIB:amiga.lib
  51. echo "-- done linking '<main_file>'. --"
  52. LAB END
  53.